<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="laundryRequest.title"/></title>
    <meta name="heading" content="<fmt:message key='laundryRequest.heading'/>"/>
    <meta name="menu" content="RoleAdminLaundry"/>
    <script type="text/javascript" src="<c:url value='/scripts/calendar/calendar.js'/>"></script>
    <script type="text/javascript" src="<c:url value='/scripts/calendar/lang/calendar-es.js'/>"></script>
    <script type="text/javascript" src="<c:url value='/scripts/calendar/calendar-setup.js'/>"></script>
    <script type="text/javascript">
        window.onload = function() {
            Calendar.setup({
                inputField: "initDate",
                ifFormat: "%d/%m/%Y",
                button: "initDate"
            });

        }
    </script>
</head>
<div id="help">
    <h2>
        <a href="<c:url value='helpLaundryRequestForm.html?decorate=false'/>"
           title="Help laundry request form"
           onclick="Modalbox.show(this.href, {title: this.title, width: 600}); return false;">
            <fmt:message key="help"/>
        </a>
    </h2>
</div>
<s:form id="laundryForm" action="editLaundry" method="post" validate="true">
    <s:hidden key="laundry.id" cssClass="text medium"/>
    <table border="0">
        <tbody>
            <tr>
                <td>
                    <s:textfield key="laundry.name" id="laundryNameID" required="true" cssClass="text medium"/>
                </td>
                <td>
                    <s:textfield key="laundry.address" id="laundryAddressID" required="true" cssClass="text medium"/>
                </td>
                <td>
                    <s:textfield id="initDate" key="dateSing" required="true" size="9"/>
                </td>

            </tr>
        </tbody>
    </table>

    <li class="buttonBar bottom">
        <s:submit cssClass="button" method="save" key="button.save" theme="simple"/>
        <c:if test="${not empty laundry.id}">
            <s:submit cssClass="button" method="delete" key="button.delete" theme="simple"/>
        </c:if>
        <s:submit cssClass="button" method="cancel" key="button.cancel" theme="simple"/>
    </li>
</s:form>

<script type="text/javascript">
    Form.focusFirstElement($("laundryForm"));
</script>